import  QGuanRunApplication from "./static/js/start/qguan.js"
import RootLoad from "./static/js/start/root/RootLoad.js";
import Jsr from "./static/js/jsr/Jsr.js";
import  AopFactory from "./static/js/start/AopFactory.js"
import  jsrLoad from "./static/js/start/run/jsrLoad.js"
import { ipcRenderer, remote } from 'electron';
window.ipcRenderer=ipcRenderer;
window.remote=remote;

let packtmp=  './src/lib/z_webDemo/\n' +
    'electronReact,application.config,,runJsr';
let packList=packtmp.split("\n");
let patmp0=packList[0].split(",")
let patmp1=packList[1].split(",")

const inBrowser = typeof window !== 'undefined'
new QGuanRunApplication()

let jsr=new Jsr();
let   root =     RootLoad(inBrowser,patmp0[0]);
root.then((root1)=>{
    root1.inBrowser=false;
    qguan('root',root1,null,"save");
    qguan('jsr',jsr,null,"save");
    let aopFactory=new AopFactory();
    qguan('comm',patmp1,null,"save")
    qguan("jsrLoad",jsrLoad,null,"save");
    qguan("aopFactory",aopFactory,null,"save");
    qguan('qguan',"",'qguan','jsrLoad')
})